package com.koron.sinoprobe.web.ledger.service;

import com.koron.bean.workflow.RedirectQuery;
import com.koron.sinoprobe.web.ledger.bean.entity.SpProjectChange;
import com.koron.sinoprobe.web.ledger.bean.query.SpProjectChangeQuery;
import com.koron.sinoprobe.web.ledger.bean.vo.SpProjectChangeVO;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * @author twcao
 * @title: SpProjectChangeService
 * @projectName GDH_EAM_V2
 * @description: 项目变更service
 * @date 2022/2/1116:35
 */
public interface SpProjectChangeService {

    SpProjectChange queryById(SessionFactory factory, String id);

    SpProjectChangeVO getDetailById(SessionFactory factory, String id);

    List<SpProjectChange> queryList(SessionFactory factory, SpProjectChangeQuery query);

    SpProjectChangeVO saveOrUpdate(SessionFactory factory, SpProjectChangeVO detail, Boolean isSubmit);

    SpProjectChangeVO saveOrUpdateVo(SessionFactory factory, SpProjectChangeVO detail);

    SpProjectChange saveOrUpdate(SessionFactory factory, SpProjectChange change);

    Boolean deleteById(SessionFactory factory, String id);

    Boolean deleteById(SessionFactory factory, String id, boolean isDeleteWorkflow);

    /**
     * 工作流更新
     * @param factory
     * @param redirectQuery
     */
    Boolean workflowUpdate(SessionFactory factory, RedirectQuery redirectQuery);

    SpProjectChange auditFinish(SessionFactory factory, SpProjectChangeVO bean);

    /**
     * 项目变更
     * @param factory 会话
     * @param id 项目变更id
     * @return 是否变更成功
     */
    boolean submit(SessionFactory factory, String id);
}
